package cn.itcast.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

@MapperScan("cn.itcast.order.mapper")
@SpringBootApplication
@EnableFeignClients(basePackages = {"cn.itcast.feign.clients"})//扫描所有Feign接口类
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

    /**
     * 注册RestTmeplate实例，方便调用http接口
     * @return
     */
//    @Bean
//    @LoadBalanced//开启ribbon负载均衡机制
//    public RestTemplate restTemplate(){
//        return new RestTemplate();
//    }
    //修改负载均衡策略（算法）
//    @Bean
//    public IRule rule(){
//        return new NacosRule();
//    }
}